package eventos.barraMenu;

import java.awt.Desktop;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;

public class EventoMostrarAyuda extends MouseAdapter {
	
	public EventoMostrarAyuda()
	{
		super();
	}
	
	@Override
	public void mouseClicked(MouseEvent e)
	{
	    if (Desktop.isDesktopSupported())
	    {
	        Desktop desktop = Desktop.getDesktop();
	        if (desktop.isSupported(Desktop.Action.BROWSE)) {
	            try {
	                desktop.browse(new URI(""+getClass().getResource("../doc/tallerPangea.html")));
	                desktop.browse(new URI(""+getClass().getResource("../doc/tallerPangea.pdf")));
	            }
	            catch(IOException ioe) {
	                ioe.printStackTrace();
	            }
	            catch(URISyntaxException use) {
	                use.printStackTrace();
	            }
	        }
	    }
	    else
	    {
	    	System.out.println("no soportado");
	    }
	}

}
